Repository navigation
[BENCH] Add call opcode microbenchmarks - #5701
Open
Harshbhargav45 wants to merge 1 commit into
Open
Harshbhargav45 wants to merge 1 commit into
Harshbhargav45 wants to merge 1 commit into
Conversation
abdulhamid999
left a comment
There was a problem hiding this comment.
Reviewed against benches/benches/scripts.rs, benches/scripts/basic/call-loop.js, and benches/scripts/closures/invoke.js (static inspection; not executed locally).
Findings
- Benchmark harness integration: Confirmed
benches/benches/scripts.rsdiscovers every.jsfile underbenches/scripts/viaWalkDirand looks up globalmain(), so all three new scripts (call_arrow.js,call_construct.js,call_simple.js) integrate automatically and follow the existingmain()return convention seen inclosures/invoke.js. - Overlap & iteration count note: Note that
benches/scripts/basic/call-loop.jsalready benchmarks100_000calls to a 0-argument functionf(), whereascalls/call_simple.jsuses10_000iterations of a 1-argumentidentity(i)call accumulated via+=(result += identity(i)). Using10_000(iterationCount) vs100_000in existing scripts is fine if intentional for criterion sample timings, though worth keeping in mind if comparingcall_simpledirectly againstbasic/call-loop. - Nice coverage expansion for arrow calls and constructor calls (
new Empty()).
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This Pull Request fixes #5204.
It changes the following:
Testing
cargo bench -p boa_benches --bench scripts -- '^calls/' --sample-size 10 --measurement-time 1 --warm-up-time 1— passed; ran only the three new cases.main()with Boa: the call scripts returned49995000, and the construction script returned anEmptyinstance.git diff --check— passed.PR #5205 was closed as stale. This PR keeps the change limited to the benchmark scripts requested by the issue.